import {API_CONFIG} from "../config/index.js";
import request from "./index.js";

// namespace
export const  getNamespaceListHandler = (clusterId)=>{
    console.log("查看namespace列表:",clusterId)
    return request(API_CONFIG.getNamespaceListApi,{clusterId},"GET",2000)
}

// namespace
export const  createNamespaceHandler = (clusterId,name)=>{
    console.log("创建namespace:",clusterId,name)
    return request(API_CONFIG.createNamespaceApi,{clusterId,name},"POST",2000)
}

// namespace
export const  deleteNamespaceHandler = (clusterId,name)=>{
    console.log("删除namespace:",clusterId,name)
    return request(API_CONFIG.deleteNamespaceApi,{clusterId,name},"GET",2000)
}

// namespace
export const  updateNamespaceHandler = (clusterId,name,item)=>{
    console.log("更新namespace:",clusterId,name,item)
    return request(API_CONFIG.updateNamespaceApi,{clusterId,name,item},"POST",2000)
}